import java.util.*;

/**
 * Created by user on 16.02.14.
 */
public class ShifrManager {


    public static String stringShifr(String s, int key) {
        String tmp = "";
        char c;
        for (int i = 0; i < s.length() - 1; i++) {
            c = s.charAt(i);
            c = (char) (c + key);
            tmp += c;
        }
        return tmp;
    }

    public static String stringDeshifr(String s, int key) {
        String tmp = "";
        char c;
        for (int i = 0; i < s.length() - 1; i++) {
            c = s.charAt(i);
            c = (char) (c - key);
            tmp += c;
        }
        return tmp;
    }


}
